import java.util.Scanner;

public class recursive {
    //递归求N的阶乘

    /**
     * 递归求阶乘
     * @param N
     * @return 阶乘值
     */
    public static int RecursiveNum(int N) {
        if(N == 1) {
            return 1;
        }
        return  N*RecursiveNum(N-1);//一个函数
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
       int ret = RecursiveNum(N);
        System.out.println(ret);
    }
}
